<template>
  <div id="app">
    <router-view />
    <!-- 当当前路由信息是在登录页或者详情页的时候,不展示下面页脚 -->
    <!-- <Footer v-if="route.path !== '/login'"></Footer> -->
    <Footer v-if="!Route.includes(route.path)"></Footer>
  </div>
</template>

<script setup lang="ts">
// 全局组件
import Footer from '@/components/Footer/index.vue'
// 导入路由
import { useRoute } from 'vue-router'
// 导入vue
import { onMounted } from 'vue'

// 获取当前路由信息
const route = useRoute()
// 定义一个路由数组
const Route = ['/login', '/details', '/search']

onMounted(() => {
  console.log(route)
})
</script>

<style scoped>
.icon {
  width: 1em;
  height: 1em;
  vertical-align: -0.15em;
  fill: currentColor;
  overflow: hidden;
}
</style>
